package hello;

import java.util.Scanner;

public class Test7 {
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		System.out.println("请输入一个整数：");
		int a=in.nextInt();
		int s=0,b,c = 0;
		if(c>0){
			b=a%10;
			s+=b;
			c=a/10;
			if(c==0) c=a%10;
			a=c;
		}
		System.out.println(s);
		
		in.close();}

}
